package com.ibl.rover.lite.client;

import java.io.PrintWriter;
import java.io.StringWriter;

public class Formatter {

	private static final int INITIAL_BUFFER_SIZE = 256;
	StringBuffer buffer = new StringBuffer(INITIAL_BUFFER_SIZE);
	public static final String DEFAULT_DELIMITER = "-";

	public String format(Object message, Throwable t) {
		StringWriter traceWriter = new StringWriter();
		PrintWriter printWriter;
		if (t != null) {

			printWriter = new PrintWriter(traceWriter, false);
			t.printStackTrace(printWriter);
			printWriter.close();

			return traceWriter.getBuffer().toString();
		}
		return null;

	}
}